package com.example.sunny.service.dao

import android.util.Log
import com.example.sunny.pojo.location.MyLocation
import com.example.sunny.pojo.weather.DailyResponse

object ApplicationDao {
    fun updateDB(myLocation: MyLocation,daily: DailyResponse.Daily){

        WeatherDao.deleteDaily(daily)


        daily.clearSavedState()
        WeatherDao.saveDaily(daily)


        PlaceDao.deleteLocation()


        myLocation.clearSavedState()
        myLocation.let { PlaceDao.saveLocation(it) }

    }

}